home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / tools / dev_libs / feelin040718 / demos / notify.e < prev    next >
Text File  |  2004-08-03  |  4KB  |  132 lines

  1. OPT PREPROCESS
  2.  
  3. MODULE 'feelin','libraries/feelin'
  4.  
  5. PROC main()
  6.    DEF app,win,
  7.        g,gl,gr,gc,
  8.        pl1,pl2,pr1,pr2,pc,pcl,pcr,tog,
  9.        rtable:PTR TO feelinDynamicEntry
  10.  
  11.    IF feelinbase := OpenLibrary('feelin.library',FV_VERSION)
  12.       app := AppObject,
  13.          Child, win := WindowObject,
  14.             FA_Window_Title,  'Feelin : Notify',
  15.             FA_Window_Open,   TRUE,
  16.  
  17.             Child, g := HGroup,
  18.                Child, gl  := vGauge(0,100,0),
  19.                Child, pl1 := vProp(0,10,111),
  20.                Child, pl2 := vProp(0,10,111),
  21.  
  22.                Child, VGroup,
  23.                   Child, pc := hProp(0,10,111),
  24.  
  25.                   Child, HGroup,
  26.                      Child, pcl := hProp(0,10,111),
  27.                      Child, pcr := hProp(0,10,111),
  28.                   End,
  29.  
  30.                   Child, gc := hGauge(0,100,0),
  31.  
  32.                   Child, HGroup,
  33.                      Child, TextObject,         FA_SetMax,TRUE, DontChain, FA_Text, 'Toggle gauges look', FA_Text_VCenter,TRUE, End,
  34.                      Child, tog := ImageObject, FA_SetMax,TRUE, InputToggle, 'FA_Image_Spec','FP_CheckMark_Image', End,
  35.                   End,
  36.                End,
  37.  
  38.                Child, pr2 := vProp(0,10,111),
  39.                Child, pr1 := vProp(0,10,111),
  40.                Child, gr  := vGauge(0,100,0),
  41.             End,
  42.          End,
  43.       End
  44.  
  45.       IF app
  46.          rtable := ['FA_Prop_First',   0,
  47.                     'FA_Numeric_Value',0,
  48.                     'FA_Gauge_Simple', 0, NIL]
  49.  
  50.          F_DynamicResolveTable(rtable)
  51.  
  52.          F_DoA(pcl,FM_Notify,[F_ID(rtable,0),FV_Notify_Always,pl1,FM_Set,2,F_ID(rtable,0),FV_Notify_Value])
  53.          F_DoA(pcl,FM_Notify,[F_ID(rtable,0),FV_Notify_Always,pl2,FM_Set,2,F_ID(rtable,0),FV_Notify_Value])
  54.          F_DoA(pcr,FM_Notify,[F_ID(rtable,0),FV_Notify_Always,pr2,FM_Set,2,F_ID(rtable,0),FV_Notify_Value])
  55.          F_DoA(pcr,FM_Notify,[F_ID(rtable,0),FV_Notify_Always,pr1,FM_Set,2,F_ID(rtable,0),FV_Notify_Value])
  56.  
  57.          F_DoA(pc,FM_Notify,[F_ID(rtable,0),FV_Notify_Always,gc,FM_Set,2,F_ID(rtable,1),FV_Notify_Value])
  58.          F_DoA(gc,FM_Notify,[F_ID(rtable,1),FV_Notify_Always,gl,FM_Set,2,F_ID(rtable,1),FV_Notify_Value])
  59.          F_DoA(gc,FM_Notify,[F_ID(rtable,1),FV_Notify_Always,gr,FM_Set,2,F_ID(rtable,1),FV_Notify_Value])
  60.          F_DoA(gl,FM_Notify,[F_ID(rtable,1),FV_Notify_Always,pcl,FM_Set,2,F_ID(rtable,0),FV_Notify_Value])
  61.          F_DoA(gr,FM_Notify,[F_ID(rtable,1),FV_Notify_Always,pcr,FM_Set,2,F_ID(rtable,0),FV_Notify_Value])
  62.  
  63.          F_DoA(tog,FM_Notify,[FA_Selected,FV_Notify_Always,g,FM_Set,4,F_ID(rtable,2),FV_Notify_Value,FA_Group_Forward,TRUE])
  64.  
  65.          F_DoA(win,FM_Notify,[FA_Window_CloseRequest,TRUE,app,FM_Application_Shutdown,0])
  66.  
  67.          F_DoA(app,FM_Application_Run,NIL)
  68.  
  69.          F_DisposeObj(app)
  70.       ENDIF
  71.  
  72.       CloseLibrary(feelinbase)
  73.    ELSE
  74.       WriteF('Unable to open feelin.library\n')
  75.    ENDIF
  76. ENDPROC
  77.  
  78. PROC vProp(first,visible,entries)
  79.    RETURN PropObject,
  80.           FA_Frame, 'FP_Prop_Frame',
  81.           FA_Back,  'FP_Prop_Back',
  82.  
  83.           FA_MinWidth, 20,
  84.           FA_MaxWidth, 20,
  85.  
  86.           'FA_Prop_Entries', entries,
  87.           'FA_Prop_First',   first,
  88.           'FA_Prop_Visible', visible,
  89.  
  90.           End
  91. ENDPROC
  92. PROC hProp(first,visible,entries)
  93.    RETURN   PropObject,
  94.  
  95.             FA_Horizontal,       TRUE,
  96.             FA_MinWidth,         50,
  97.             FA_FixHeight,        10,
  98.  
  99.             'FA_Prop_Entries',   entries,
  100.             'FA_Prop_First',     first,
  101.             'FA_Prop_Visible',   visible,
  102.  
  103.             End
  104. ENDPROC
  105. PROC hGauge(min,max,val)
  106.    RETURN   GaugeObject,
  107.             GaugeFrame,
  108.  
  109.             FA_Horizontal,    TRUE,
  110.             FA_SetMax,        FV_SetMaxH,
  111.             FA_ChainToCycle,  FALSE,
  112.  
  113.             'FA_Numeric_Min',    min,
  114.             'FA_Numeric_Max',    max,
  115.             'FA_Numeric_Value',  val,
  116.  
  117.             End
  118. ENDPROC
  119. PROC vGauge(min,max,val)
  120.    RETURN   GaugeObject,
  121.             GaugeFrame,
  122.  
  123.             FA_ChainToCycle,     FALSE,
  124.             FA_FixWidth,         20,
  125.  
  126.             'FA_Numeric_Min',    min,
  127.             'FA_Numeric_Max',    max,
  128.             'FA_Numeric_Value',  val,
  129.  
  130.             End
  131. ENDPROC
  132.